/*
 *  $Id: Sparkbomb.cs 1051 2010-05-18 22:10:41Z thenn.erannor $
 *	This file is a part of Ragima CCG.
 *	(C) 2008 Ragima development group.
 *
 *	Licensed under the terms of the GNU GPL License version 2.
 *
 */

namespace Ragima.Cards001.Air.Abilities {
    public class Sparkbomb: AbilityCard<Creature> {
        public Sparkbomb(): base("001_a_a_sparkbomb") {
            Level = CompleteLevel.ReadyForTest;
            Element = ElementType.Air;
            Target = CreatureTarget.Enemy;
            AddManaCost(ElementType.Air, 1);
            TapCreatureAfterUse = false;
        }

        protected override void DoAction(TargetArgs<Creature> args) {
            args.Target.DamageBy(NewDamage(args, 1));
            args.Target.AddAffect<SparkbombAffect>();
        }

        private class SparkbombAffect: SpellAffect<Sparkbomb> {
            public SparkbombAffect(): base() {
                Add(new TimeAffect(1, TimePhase.OwnOffence, new Affects.AlwaysBlocked()));
            }
        }
    }
}
